class Solution {
public:
    int brokenCalc(int startValue, int target) {
        //逆向思维
        int step=0;
        while(target>startValue)
        {
            step++;
            //奇数不能是乘2得来的
            if(target%2==1)
            {
                target+=1;
            }
            else
            {
                target/=2;

            }
        }
        while(target<startValue)
        {
            step++;
            target++;
        }
        return step;


    }
};